<%
   measures=[]
   (1..10).each do |index|
     metric=widget_properties["metric#{index}"]
     m=(metric ? measure(metric) : nil)
     measures << m if m
   end
   period = params[:period]
   unless measures.empty? || measures.none? { |measure| measure.visible?(period.to_i) }
%>
  <div class="widget-row">
    <%
       measures.each do |measure|
         if measure.visible?(period.to_i)
    -%>
        <div class="widget-span widget-span-3">
          <div class="widget-measure-container">
            <p class="widget-measure widget-measure-main">
              <span class="widget-label"><%= measure.metric.short_name -%></span>
              <span class="nowrap">
                <% if measure.value.nil? -%>
                  <%= format_measure(measure, :url => url_for_drilldown(measure, :period => period), :period => period) -%>
                <% else %>
                  <%= format_measure(measure, :url => url_for_drilldown(measure)) -%>
                  <%= dashboard_configuration.selected_period? ? format_variation(measure) : trend_icon(measure) -%>
                <% end -%>
              </span>
            </p>
          </div>
        </div>
      <%
         end
         end
      -%>
  </div>
<% end %>
